package commonControllers
import (
	."LiquidMeasurement/lib"

)
var (
	udp_server = new(UdpServerController)
	//tcp_subscribe = make(chan TcpUdpCmd, 100)
	udp_subscribe = make(chan TcpUdpCmd, 100)   //用于UDP事件的处理,包括UDP错误的重启

)

func SendBroadcast()  {
	cmd := TcpUdpCmd{200,1,""}
	udp_subscribe <-cmd
}

func UdpHandleProcess()  {
	//连接池的事件处理中心
		for {
			select {
			case dev := <-udp_subscribe:
				if dev.OpCode == 1 {
					//SendInformBroadcast(dev)
				}
			}
				//fmt.Printf("chatroom subscribe event\n")
				//beego.Info("send device:", dev.Mac, ";WebSocket:", dev.Conn != nil)

		}

}


func init() {

}
//func TcpHandleProcess()  {
//
//}






